const { vital } = require("../utils/log_tool");
const { BaseCommand } = require("./base");

class ExportDiffHeadCommand extends BaseCommand {
    async execute() {
        switch (this.selfData.type) {
            case "svn": {
                return await this.forward("svn_export_diff_head");
                break;
            }
            case "git": {
                return await this.forward("git_export_diff_head");
                break;
            }
            default: {
                throw `不支持的类型 ${this.selfData.type}`;
                break;
            }
        }
    }

    getRequiredParams() {
        return ["type"];
    }
}

module.exports = {
    ExportDiffHeadCommand,
};
